<!DOCTYPE html><html><head><title>API</title><meta charset='utf-8'><link href='https://dn-maxiang.qbox.me/res-min/themes/marxico.css' rel='stylesheet'><style></style></head><body><div id='preview-contents' class='note-content'>
                        
                    



<h2 id="api">API</h2>

<p><a href="#id1">1.开始页面</a> <br>
<a href="#id2">2.上传文件</a> <br>
<a href="#id3">3.下载文件</a> <br>
<a href="#id4">4.创建商店</a> <br>
<a href="#id5">5.查询商店信息</a> <br>
<a href="#id6">6.获取店家排名</a> <br>
<a href="#id7">7.修改店家的让利</a> <br>
<a href="#id8">8.添加商品</a> <br>
<a href="#id9">9.付账</a> <br>
<a href="#id10">10. 获取账单</a> <br>
<a href="#id11">11. 获取打钱列表</a> <br>
<a href="#id12">12. 修改打过钱的状态</a> <br>
<a href="#id13">13. 生成付款码</a> <br>
<a href="#id14">14. 支付成功修改状态</a> <br>
<a href="#id15">15. 生成小程序码</a> <br>
<a href="#id16">16. 添加银行信息</a> <br>
<a href="#id17">17. 获取商家的余额</a> <br>
<a href="#id18">18. 更新商家的余额</a> <br>
<a href="#id19">19. 获取商店列表</a> <br>
<a href="#id20">20. 给代理商打钱</a></p>

<p style="color: red"> code为0，代表请求成功,取data拿具体的数据, -1:代表失败取errmsg取错误信息(以下接口都一样)
localhost 换成 https://www.greatforworld.com</p>



<h3 id="1开始页面"><span id="id1">1.开始页面</span></h3>



<h4 id="客户端">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>openid</td>  <td>openid</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>nickname</td>  <td>昵称</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>bankId</td>  <td>银行卡</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>phone</td>  <td>手机号</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>mail</td>  <td>邮箱</td>  <td>String</td>  <td>N</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>,
</div><div class="hljs-line">url: <span class="hljs-string">'http://localhost:3000/begin'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs haml"><div class="hljs-line">curl -X POST \
</div><div class="hljs-line">  http://localhost:3000/begin \
</div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Cache-Control: no-cache'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Content-Type: application/x-www-form-urlencoded'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Postman-Token: 4cd90bbd-b864-452d-9998-6cc4acf8e085'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">d <span class="hljs-string">'type=file&amp;openid=weasdadwerwqweqwe&amp;nickname=tom&amp;bankId=52300869201928188&amp;phone=135092784820&amp;mail=123%40qq.com'</span></span>
</div></code></pre>



<h3 id="服务器端返回">服务器端返回</h3>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: []
</div><div class="hljs-line">}
</div></code></pre>

<blockquote>
  <p>说明: data为空数组进入用户模式,data不为空，取对应的data数据进入商户模式</p>
</blockquote>



<h3 id="2上传文件"><span id="id2">2.上传文件</span></h3>



<h4 id="客户端-1">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>files</td>  <td>文件</td>  <td>File</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/common/upload'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs sql"><div class="hljs-line">curl -X POST \
</div><div class="hljs-line">  http://localhost:3000/common/upload \
</div><div class="hljs-line">  -H '<span class="hljs-keyword">Cache</span>-Control: <span class="hljs-keyword">no</span>-<span class="hljs-keyword">cache</span><span class="hljs-string">' \
</span></div><div class="hljs-line">  -H 'Postman-Token: <span class="hljs-number">2</span>a1dc717<span class="hljs-number">-1</span>aea<span class="hljs-number">-44</span>a8<span class="hljs-number">-8317</span><span class="hljs-number">-8054</span>da44dd17<span class="hljs-string">' \
</span></div><div class="hljs-line">  -H '<span class="hljs-keyword">content</span>-<span class="hljs-keyword">type</span>: multipart/<span class="hljs-keyword">form</span>-<span class="hljs-keyword">data</span>; boundary=<span class="hljs-comment">----WebKitFormBoundary7MA4YWxkTrZu0gW' \</span>
</div><div class="hljs-line">  -F files=@/Users/administrator/Desktop/17361068.jpeg
</div></code></pre>



<h4 id="服务器端返回-1">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: [
</div><div class="hljs-line">        {
</div><div class="hljs-line">            <span class="hljs-attr">"id"</span>: <span class="hljs-string">"5abb017b3d1ca1261a1a8d71"</span>
</div><div class="hljs-line">        }
</div><div class="hljs-line">    ]
</div><div class="hljs-line">}
</div></code></pre>

<blockquote>
  <p>上传文件成功,返回文件的唯一标识</p>
</blockquote>



<h3 id="3下载文件"><span id="id3">3.下载文件</span></h3>



<h4 id="客户端-2">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>id</td>  <td>文件的唯一标识</td>  <td>Number</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url： <span class="hljs-string">'localhost:3000/common/downLoadFile?id=5abb017b3d1ca1261a1a8d71'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'get'</span>
</div></code></pre>



<h3 id="服务器返回">服务器返回</h3>



<pre class="prettyprint hljs-dark"><code class="hljs gcode"><div class="hljs-line">会自动下载文件 <span class="hljs-comment">(可以直接把url丢浏览器看效果)</span>
</div></code></pre>



<h3 id="4创建商店"><span id="id4">4.创建商店</span></h3>



<h4 id="客户端-3">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>openid</td>  <td>openid</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>nickname</td>  <td>昵称</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>bankId</td>  <td>银行卡</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>phone</td>  <td>手机号</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>pic</td>  <td>商店logoid</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>bankName</td>  <td>开户银行</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>bindBankName</td>  <td>银行卡绑定的姓名</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>mail</td>  <td>邮箱</td>  <td>String</td>  <td>N</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/onloadstore'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs llvm"><div class="hljs-line">curl -X POST \
</div><div class="hljs-line">  http://localhost:<span class="hljs-number">3000</span>/onloadstore \
</div><div class="hljs-line">  -H 'Cache-Control: no-cache' \
</div><div class="hljs-line">  -H 'Content-Type: application/<span class="hljs-keyword">x</span>-www-form-urlencoded' \
</div><div class="hljs-line">  -H 'Postman-Token: <span class="hljs-number">8</span>b<span class="hljs-number">5</span>f<span class="hljs-number">3</span>b<span class="hljs-number">1</span>e-fe<span class="hljs-number">77</span><span class="hljs-number">-4</span><span class="hljs-keyword">c</span><span class="hljs-number">0</span>f<span class="hljs-number">-8580</span><span class="hljs-number">-2</span><span class="hljs-keyword">c</span><span class="hljs-number">689212</span>f<span class="hljs-number">810</span>' \
</div><div class="hljs-line">  -d 'openid=weasdadwerwqweqwe&amp;name=<span class="hljs-symbol">%E8</span><span class="hljs-symbol">%8</span>A<span class="hljs-symbol">%B1</span><span class="hljs-symbol">%E5</span><span class="hljs-symbol">%BA</span><span class="hljs-symbol">%973</span>&amp;address=<span class="hljs-symbol">%E6</span><span class="hljs-symbol">%B7</span><span class="hljs-symbol">%B1</span><span class="hljs-symbol">%E5</span><span class="hljs-symbol">%9</span>C<span class="hljs-symbol">%B3</span><span class="hljs-symbol">%E5</span><span class="hljs-symbol">%B8</span><span class="hljs-symbol">%82</span>yy<span class="hljs-symbol">%E5</span><span class="hljs-symbol">%A4</span><span class="hljs-symbol">%A7</span><span class="hljs-symbol">%E8</span><span class="hljs-symbol">%A1</span><span class="hljs-symbol">%97</span>&amp;feature=<span class="hljs-symbol">%E8</span><span class="hljs-symbol">%89</span><span class="hljs-symbol">%B3</span>&amp;pic=<span class="hljs-number">5</span>abb<span class="hljs-number">017</span>b<span class="hljs-number">3</span>d<span class="hljs-number">1</span>ca<span class="hljs-number">1261</span>a<span class="hljs-number">1</span>a<span class="hljs-number">8</span>d<span class="hljs-number">71</span>&amp;bankId=<span class="hljs-number">62323453423323131</span>&amp;bankName=<span class="hljs-symbol">%E4</span><span class="hljs-symbol">%B8</span><span class="hljs-symbol">%AD</span><span class="hljs-symbol">%E5</span><span class="hljs-symbol">%9</span>B<span class="hljs-symbol">%BD</span><span class="hljs-symbol">%E5</span><span class="hljs-symbol">%86</span><span class="hljs-symbol">%9</span>C<span class="hljs-symbol">%E8</span><span class="hljs-symbol">%A1</span><span class="hljs-symbol">%8</span>C&amp;bindBankName=tom'
</div></code></pre>



<h4 id="服务器返回-1">服务器返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: {
</div><div class="hljs-line">        <span class="hljs-attr">"storied"</span>: <span class="hljs-string">"花店2135092784820"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"name"</span>: <span class="hljs-string">"花店2"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"address"</span>: <span class="hljs-string">"深圳市yy大街"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"tel"</span>: <span class="hljs-string">"135092784820"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"pic"</span>: <span class="hljs-string">"5abb017b3d1ca1261a1a8d71"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"consumerqueue"</span>: []
</div><div class="hljs-line">    }
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="5查询商店信息"><span id="id5">5.查询商店信息</span></h3>



<h4 id="客户端-4">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>storied</td>  <td>商店的唯一标识</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/getStreInfo?storied=火锅店135092784820'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'get'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs llvm"><div class="hljs-line">curl -X GET \
</div><div class="hljs-line">  'http://localhost:<span class="hljs-number">3000</span>/getStreInfo?storied=<span class="hljs-symbol">%E7</span><span class="hljs-symbol">%81</span><span class="hljs-symbol">%AB</span><span class="hljs-symbol">%E9</span><span class="hljs-symbol">%94</span><span class="hljs-symbol">%85</span><span class="hljs-symbol">%E5</span><span class="hljs-symbol">%BA</span><span class="hljs-symbol">%97135092784820</span>' \
</div><div class="hljs-line">  -H 'Cache-Control: no-cache' \
</div><div class="hljs-line">  -H 'Postman-Token: <span class="hljs-number">544591e2</span><span class="hljs-number">-06</span>a<span class="hljs-number">5</span><span class="hljs-number">-4373</span>-ba<span class="hljs-number">8e-102</span>a<span class="hljs-number">5</span><span class="hljs-keyword">c</span><span class="hljs-number">56</span>ff<span class="hljs-number">81</span>' \
</div><div class="hljs-line">  -H 'content-<span class="hljs-keyword">type</span>: multipart/form-data<span class="hljs-comment">; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
</span></div><div class="hljs-line">  -F files=@/Users/administrator/Desktop/<span class="hljs-number">17361068</span>.jpeg
</div></code></pre>



<h4 id="服务器返回-2">服务器返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: {
</div><div class="hljs-line">        <span class="hljs-attr">"t"</span>: <span class="hljs-number">0.5</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"sum"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"num"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"cache"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"goodlist"</span>: [],
</div><div class="hljs-line">        <span class="hljs-attr">"name"</span>: <span class="hljs-string">"火锅店"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"address"</span>: <span class="hljs-string">"深圳市xx大街"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"feature"</span>: <span class="hljs-string">"辣"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"tel"</span>: <span class="hljs-string">"135092784820"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"pic"</span>: <span class="hljs-string">"5abb017b3d1ca1261a1a8d71"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"storied"</span>: <span class="hljs-string">"火锅店135092784820"</span>,
</div><div class="hljs-line">        <span class="hljs-attr">"createdAt"</span>: <span class="hljs-string">"2018-03-28T03:13:32.450Z"</span>
</div><div class="hljs-line">    }
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="6获取店家排名"><span id="id6">6.获取店家排名</span></h3>



<h4 id="客户端-5">客户端</h4>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/ranking'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'get'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs haml"><div class="hljs-line">curl -X GET \
</div><div class="hljs-line">  http://localhost:3000/ranking \
</div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Cache-Control: no-cache'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Postman-Token: 205a1234-8958-4774-be61-6f3fd566846e'</span></span>
</div></code></pre>



<h4 id="服务器端返回-2">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: [
</div><div class="hljs-line">        {
</div><div class="hljs-line">            <span class="hljs-attr">"t"</span>: <span class="hljs-number">0.5</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"sum"</span>: <span class="hljs-number">20</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"num"</span>: <span class="hljs-number">1</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"cache"</span>: <span class="hljs-number">2</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"goodlist"</span>: [],
</div><div class="hljs-line">            <span class="hljs-attr">"name"</span>: <span class="hljs-string">"花店"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"address"</span>: <span class="hljs-string">"深圳市yy大街"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"feature"</span>: <span class="hljs-string">"艳"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"tel"</span>: <span class="hljs-string">"135092784820"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"pic"</span>: <span class="hljs-string">"5abb017b3d1ca1261a1a8d71"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"storied"</span>: <span class="hljs-string">"花店135092784820"</span>
</div><div class="hljs-line">        },
</div><div class="hljs-line">        {
</div><div class="hljs-line">            <span class="hljs-attr">"t"</span>: <span class="hljs-number">0.5</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"sum"</span>: <span class="hljs-number">10</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"num"</span>: <span class="hljs-number">1</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"cache"</span>: <span class="hljs-number">2</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"goodlist"</span>: [],
</div><div class="hljs-line">            <span class="hljs-attr">"name"</span>: <span class="hljs-string">"火锅店"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"address"</span>: <span class="hljs-string">"深圳市xx大街"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"feature"</span>: <span class="hljs-string">"辣"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"tel"</span>: <span class="hljs-string">"135092784820"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"pic"</span>: <span class="hljs-string">"5abb017b3d1ca1261a1a8d71"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"storied"</span>: <span class="hljs-string">"火锅店135092784820"</span>
</div><div class="hljs-line">        }
</div><div class="hljs-line">    ]
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="7修改店家的让利"><span id="id7">7.修改店家的让利</span></h3>



<h4 id="客户端-6">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>storied</td>  <td>商店的唯一标识</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>t</td>  <td>商店的让利</td>  <td>Number</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/modifyStoreInfo_t'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs haml"><div class="hljs-line">curl -X POST \
</div><div class="hljs-line">  http://localhost:3000/modifyStoreInfo_t \
</div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Cache-Control: no-cache'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Content-Type: application/x-www-form-urlencoded'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Postman-Token: ea604d01-a328-4e65-ab97-f8ddd4332e05'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">d <span class="hljs-string">'t=0.2&amp;storied=%E7%81%AB%E9%94%85%E5%BA%97135092784820'</span></span>
</div></code></pre>



<h4 id="服务器返回-3">服务器返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: <span class="hljs-string">"modify successful"</span>
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="8添加商品"><span id="id8">8.添加商品</span></h3>



<h4 id="客户端-7">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>storied</td>  <td>商店的唯一标识</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>name</td>  <td>商品的名字</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>price</td>  <td>商品的价格</td>  <td>Number</td>  <td>Y</td></tr><tr>  <td>id</td>  <td>商品的图片id</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs groovy"><div class="hljs-line"><span class="hljs-string">url:</span> <span class="hljs-string">'localhost:3000/addGodds'</span>,
</div><div class="hljs-line"><span class="hljs-string">methods:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs llvm"><div class="hljs-line">curl -X POST \
</div><div class="hljs-line">  http://localhost:<span class="hljs-number">3000</span>/addGodds \
</div><div class="hljs-line">  -H 'Cache-Control: no-cache' \
</div><div class="hljs-line">  -H 'Content-Type: application/<span class="hljs-keyword">x</span>-www-form-urlencoded' \
</div><div class="hljs-line">  -H 'Postman-Token: <span class="hljs-number">432719</span>f<span class="hljs-number">5</span>-ea<span class="hljs-number">5</span>f<span class="hljs-number">-4584</span><span class="hljs-number">-8549</span><span class="hljs-number">-98</span>cad<span class="hljs-number">76</span>f<span class="hljs-number">71</span>cb' \
</div><div class="hljs-line">  -d 'name=<span class="hljs-symbol">%E8</span><span class="hljs-symbol">%82</span><span class="hljs-symbol">%A5</span><span class="hljs-symbol">%E7</span><span class="hljs-symbol">%89</span><span class="hljs-symbol">%9</span>B&amp;price=<span class="hljs-number">20</span>&amp;id=<span class="hljs-number">5</span>abb<span class="hljs-number">017</span>b<span class="hljs-number">3</span>d<span class="hljs-number">1</span>ca<span class="hljs-number">1261</span>a<span class="hljs-number">1</span>a<span class="hljs-number">8</span>d<span class="hljs-number">71</span>&amp;storied=<span class="hljs-symbol">%E7</span><span class="hljs-symbol">%81</span><span class="hljs-symbol">%AB</span><span class="hljs-symbol">%E9</span><span class="hljs-symbol">%94</span><span class="hljs-symbol">%85</span><span class="hljs-symbol">%E5</span><span class="hljs-symbol">%BA</span><span class="hljs-symbol">%97135092784820</span>'
</div></code></pre>



<h4 id="服务器端返回-3">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: <span class="hljs-string">"add successful"</span>
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="9付账"><span id="id9">9.付账</span></h3>



<h4 id="客户端-8">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>openid</td>  <td>openid</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>storied</td>  <td>商店的唯一标识</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>cost</td>  <td>消费的金额</td>  <td>Number</td>  <td>Y</td></tr><tr>  <td>nickname</td>  <td>消费者的昵称</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/pay'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs llvm"><div class="hljs-line">curl -X POST \
</div><div class="hljs-line">  http://localhost:<span class="hljs-number">3000</span>/pay \
</div><div class="hljs-line">  -H 'Cache-Control: no-cache' \
</div><div class="hljs-line">  -H 'Content-Type: application/<span class="hljs-keyword">x</span>-www-form-urlencoded' \
</div><div class="hljs-line">  -H 'Postman-Token: <span class="hljs-number">4e57</span><span class="hljs-keyword">c</span><span class="hljs-number">0</span><span class="hljs-keyword">c</span><span class="hljs-number">1</span>-b<span class="hljs-number">19</span><span class="hljs-keyword">c</span><span class="hljs-number">-4e5</span>d-a<span class="hljs-number">275</span><span class="hljs-number">-492091</span>f<span class="hljs-number">6</span>bcea' \
</div><div class="hljs-line">  -d 'openid=test<span class="hljs-number">1</span>&amp;storied=<span class="hljs-symbol">%E7</span><span class="hljs-symbol">%81</span><span class="hljs-symbol">%AB</span><span class="hljs-symbol">%E9</span><span class="hljs-symbol">%94</span><span class="hljs-symbol">%85</span><span class="hljs-symbol">%E5</span><span class="hljs-symbol">%BA</span><span class="hljs-symbol">%97135092784820</span>&amp;cost=<span class="hljs-number">10</span>&amp;nickname=jack'
</div></code></pre>



<h4 id="服务器返回-4">服务器返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: {
</div><div class="hljs-line">        <span class="hljs-attr">"orderId"</span>: <span class="hljs-string">"5abc9133d35ecf0dc618900c"</span>
</div><div class="hljs-line">    }
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="10-获取账单"><span id="id10">10. 获取账单</span></h3>



<h4 id="客户端-9">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>openid</td>  <td>openid</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/myorder?openid=test1'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'get'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs maxima"><div class="hljs-line">curl -X GET \
</div><div class="hljs-line">  'http://localhost:<span class="hljs-number">3000</span>/myorder?openid=test1' \
</div><div class="hljs-line">  -H 'Cache-Control: no-cache' \
</div><div class="hljs-line">  -H 'Postman-Token: d293c1fe-<span class="hljs-number">6b55</span>-<span class="hljs-number">4117</span>-b47e-37858c91521d'
</div></code></pre>



<h4 id="服务器返回-5">服务器返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: [
</div><div class="hljs-line">        {
</div><div class="hljs-line">            <span class="hljs-attr">"nickname"</span>: <span class="hljs-string">"jack"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"openid"</span>: <span class="hljs-string">"test1"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"storied"</span>: <span class="hljs-string">"火锅店135092784820"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"cost"</span>: <span class="hljs-string">"10"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"StoreName"</span>: <span class="hljs-string">"火锅店"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"pic"</span>: <span class="hljs-string">"5abb017b3d1ca1261a1a8d71"</span>
</div><div class="hljs-line">        },
</div><div class="hljs-line">        {
</div><div class="hljs-line">            <span class="hljs-attr">"nickname"</span>: <span class="hljs-string">"jack"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"openid"</span>: <span class="hljs-string">"test1"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"storied"</span>: <span class="hljs-string">"火锅店135092784820"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"cost"</span>: <span class="hljs-string">"10"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"StoreName"</span>: <span class="hljs-string">"火锅店"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"pic"</span>: <span class="hljs-string">"5abb017b3d1ca1261a1a8d71"</span>
</div><div class="hljs-line">        }
</div><div class="hljs-line">    ]
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="11-获取打钱列表"><span id="id11">11. 获取打钱列表</span></h3>



<h4 id="客户端-10">客户端</h4>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/getMoneyList'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'get'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs haml"><div class="hljs-line">curl -X GET \
</div><div class="hljs-line">  http://localhost:3000/getMoneyList \
</div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Cache-Control: no-cache'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Postman-Token: a973bb06-3a36-4e15-bd76-72a2faaca688'</span></span>
</div></code></pre>



<h4 id="服务器端">服务器端</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: [
</div><div class="hljs-line">        {
</div><div class="hljs-line">            <span class="hljs-attr">"openid"</span>: <span class="hljs-string">"test1"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"cost"</span>: <span class="hljs-number">7</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"_id"</span>: <span class="hljs-string">"asdasdadasdadada"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"bankId"</span>:<span class="hljs-string">"1231231"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"bankName"</span>:<span class="hljs-string">"中行"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"bindBankName"</span>:<span class="hljs-string">"tom"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"phone"</span>:<span class="hljs-string">"23123"</span>,
</div><div class="hljs-line">            <span class="hljs-attr">"mail"</span>:<span class="hljs-string">"123@qq.com"</span>
</div><div class="hljs-line">        }
</div><div class="hljs-line">    ]
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="12修改打过钱的状态"><span id="id12"> 12.修改打过钱的状态</span></h3>



<h4 id="客户端-11">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>id</td>  <td>账单id</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/updateMoney'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs haml"><div class="hljs-line">curl -X POST \
</div><div class="hljs-line">  http://localhost:3000/updateMoney \
</div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Cache-Control: no-cache'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Content-Type: application/x-www-form-urlencoded'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Postman-Token: bdfc60b2-3af3-45fb-a91c-cba367c5c804'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">d id=adadasdadadada</span>
</div></code></pre>



<h4 id="服务器端返回-4">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: <span class="hljs-string">"update sucesss"</span>
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="13-生成付款码"><span id="id13">13. 生成付款码</span></h3>



<h4 id="客户端-12">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>num</td>  <td>金额</td>  <td>Number</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/wx/'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs haml"><div class="hljs-line">curl -X POST \
</div><div class="hljs-line">  http://localhost:3000/wx/ \
</div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Cache-Control: no-cache'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Content-Type: application/x-www-form-urlencoded'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Postman-Token: 7635d8ad-f051-4644-98c4-0fb26e455f12'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">d num=<span class="hljs-number">1</span></span>
</div></code></pre>



<h4 id="服务器端返回-5">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs less"><div class="hljs-line">{
</div><div class="hljs-line">  <span class="hljs-attribute">code</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">  <span class="hljs-attribute">data</span>: {
</div><div class="hljs-line">    <span class="hljs-attribute">timeStamp</span>: <span class="hljs-number">123123131231</span>,
</div><div class="hljs-line">    <span class="hljs-attribute">nonceStr</span>: <span class="hljs-string">'12312313131'</span>,
</div><div class="hljs-line">    <span class="hljs-attribute">prepay_id</span>: <span class="hljs-string">'12312312'</span>,
</div><div class="hljs-line">    <span class="hljs-attribute">paySignStr</span>: <span class="hljs-string">'qqeqweqeqeq'</span>
</div><div class="hljs-line">  }
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="14-支付成功修改状态"><span id="id14">14. 支付成功修改状态</span></h3>



<h4 id="客户端-13">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>orderId</td>  <td>订单id</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/paySuccess'</span>
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<h4 id="服务器端返回-6">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs css"><div class="hljs-line">{
</div><div class="hljs-line">  <span class="hljs-attribute">code</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">  data: `successful`
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="15-生成小程序码"><span id="id15">15. 生成小程序码</span></h3>



<h4 id="客户端-14">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>scene</td>  <td>最大32个可见字符，只支持数字，大小写英文以及部分特殊字符：!#$&amp;’()*+,/:;=?@-._~，其它字符请自行编码为合法字符（因不支持%，中文无法使用 urlencode 处理，请使用其他编码方式）</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>page</td>  <td>必须是已经发布的小程序存在的页面（否则报错），例如 “pages/index/index” ,根路径前不要填加’/’,不能携带参数（参数请放在scene字段里），如果不填写这个字段，默认跳主页面</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>width</td>  <td>二维码的宽度,默认430</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/wx/createCode'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'get'</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs haml"><div class="hljs-line">curl -X GET \
</div><div class="hljs-line">  'http://localhost:3000/wx/createCode?scene=123&amp;page=' \
</div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Cache-Control: no-cache'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Content-Type: application/x-www-form-urlencoded'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">H <span class="hljs-string">'Postman-Token: 1d77c6b7-e1e1-4a8d-af14-66f911ab73f5'</span> \
</span></div><div class="hljs-line">  -<span class="ruby">d <span class="hljs-string">'scene=123&amp;page='</span></span>
</div></code></pre>



<h4 id="服务器端返回-7">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: <span class="hljs-string">"https://www.greatforworld.com/images/code/1522475434423.png"</span>
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="16-添加银行信息"><span id="id16">16. 添加银行信息</span></h3>



<h4 id="客户端-15">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>openid</td>  <td>openid</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>bankId</td>  <td>银行卡</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>bankName</td>  <td>开户银行</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>bindBankName</td>  <td>银行卡绑定的姓名</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url : <span class="hljs-string">'localhost:3000/addBankInfo'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<h4 id="服务器端-1">服务器端</h4>



<pre class="prettyprint hljs-dark"><code class="hljs armasm"><div class="hljs-line">{<span class="hljs-meta">code</span>: <span class="hljs-number">0</span>, <span class="hljs-meta">data</span>: `<span class="hljs-keyword">add </span><span class="hljs-keyword">bank </span>successful`}
</div></code></pre>



<h3 id="17-获取商家的余额"><span id="id17">17. 获取商家的余额</span></h3>



<h4 id="客户端-16">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>storied</td>  <td>storied</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost：3000/getStoreWallet'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'get'</span>
</div></code></pre>



<h4 id="服务器端返回-8">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: {
</div><div class="hljs-line">      <span class="hljs-attr">"bankId"</span>: <span class="hljs-string">"6223424234"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"bankName"</span>: <span class="hljs-string">"中国银行"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"bindBankName"</span>: <span class="hljs-string">"tom"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"phone"</span>: <span class="hljs-string">"123123913i1"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"mail"</span>: <span class="hljs-string">"123@qq.com"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"wallet"</span>: <span class="hljs-number">100</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"proxyPerson"</span>: <span class="hljs-number">200</span>
</div><div class="hljs-line">    }
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="18-更新商家的余额"><span id="id18">18. 更新商家的余额</span></h3>



<h4 id="客户端-17">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>storied</td>  <td>storied</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>money</td>  <td>付给商户的钱(不能大于商户的余额，否则会报错)</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/updateStoreWallet'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<h4 id="服务器端返回-9">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: <span class="hljs-string">"打钱成功"</span>
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="19-获取商店列表"><span id="id19">19. 获取商店列表</span></h3>



<h4 id="客户端-18">客户端</h4>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/getStoreList'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'get'</span>
</div></code></pre>



<h4 id="服务器端-2">服务器端</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">  <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">  <span class="hljs-attr">"data"</span>: [
</div><div class="hljs-line">    {
</div><div class="hljs-line">      <span class="hljs-attr">"_id"</span>: <span class="hljs-string">"5ac0abd0949c06048f3efca3"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"openid"</span>: <span class="hljs-string">"opfOd4kEDUVGrnFlFxjBqX4s0Ebk"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"name"</span>: <span class="hljs-string">"健康屋"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"address"</span>: <span class="hljs-string">"山东省威海市清岛湾"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"feature"</span>: <span class="hljs-string">""</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"pic"</span>: <span class="hljs-string">"5ac0abcf949c06048f3efca2"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"storied"</span>: <span class="hljs-string">"6KH3HC57NV13824429117"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"createdAt"</span>: <span class="hljs-string">"2018-04-01T09:52:16.062Z"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"updatedAt"</span>: <span class="hljs-string">"2018-04-01T09:52:16.062Z"</span>,
</div><div class="hljs-line">      <span class="hljs-attr">"proxyPerson"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    }
</div><div class="hljs-line">  ]
</div><div class="hljs-line">}
</div></code></pre>

<h3 id="20-给代理商打钱"><span id="&quot;id20">20. 给代理商打钱</span></h3>



<h4 id="客户端-19">客户端</h4>



<h4 id="客户端-20">客户端</h4>

<table><tbody><tr style="font-weight:bold">  <td>参数</td>  <td>value</td>  <td>类型</td>  <td>必填</td></tr><tr>  <td>storied</td>  <td>storied</td>  <td>String</td>  <td>Y</td></tr><tr>  <td>money</td>  <td>付给商户的钱(不能大于商户的余额，否则会报错)</td>  <td>String</td>  <td>Y</td></tr></tbody></table>



<pre class="prettyprint hljs-dark"><code class="hljs oxygene"><div class="hljs-line">url: <span class="hljs-string">'localhost:3000/updateStoreProxy'</span>,
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">method</span>:</span> <span class="hljs-string">'post'</span>
</div></code></pre>



<h4 id="服务器端返回-10">服务器端返回</h4>



<pre class="prettyprint hljs-dark"><code class="hljs json"><div class="hljs-line">{
</div><div class="hljs-line">    <span class="hljs-attr">"code"</span>: <span class="hljs-number">0</span>,
</div><div class="hljs-line">    <span class="hljs-attr">"data"</span>: <span class="hljs-string">"打钱给代理成功"</span>
</div><div class="hljs-line">}
</div></code></pre></div></body></html>